package com.briup.day12;

public class Test_Abstract {
    public static void main(String[] args) {
        My_Thread th=new My_Thread() {
            @Override
            public void run() {
                System.out.println("重写run");
            }
        };
        th.run();
        th.test();

        //简化版
        new My_Thread() {
            @Override
            public void run() {
                System.out.println("run");
            }
        }.run();
    }
}
abstract class My_Thread {
    public abstract void run();
    public void sleep() {
        System.out.println("My thread sleep......");
    }
    public void test() {
        System.out.println("My thread test......");
    }
}
